package com.fee.xmediaplayer.demo

import android.content.Intent
import android.os.Bundle
import android.widget.Button
import android.widget.FrameLayout
import androidx.appcompat.app.AppCompatActivity

/**
 ******************(^_^)***********************<br>
 * User: fee(QQ/WeiXin:1176610771)<br>
 * Date: 2022/1/22<br>
 * Time: 16:50<br>
 * <P>DESC:
 * 主界面
 * </p>
 * ******************(^_^)***********************
 */
class MainActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val frameLayout = FrameLayout(this)
        val btnToPlayer  = Button(this)
        btnToPlayer.text = "去播放"
        btnToPlayer.setOnClickListener {
            startActivity(Intent(this,PlayerActivity::class.java))
        }
        val flp = FrameLayout.LayoutParams(-2,160)
        frameLayout.addView(btnToPlayer,flp)
        setContentView(frameLayout)
    }
}